package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BillingRuleManagementMapper;
import com.ruoyi.system.domain.BillingRuleManagement;
import com.ruoyi.system.service.IBillingRuleManagementService;

/**
 * 计费规则管理Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class BillingRuleManagementServiceImpl implements IBillingRuleManagementService
{
    @Autowired
    private BillingRuleManagementMapper billingRuleManagementMapper;

    /**
     * 通过id查询计费规则管理
     *
     * @param id 计费规则管理主键
     * @return 计费规则管理
     */
    @Override
    public BillingRuleManagement selectBillingRuleManagementById(Long id)
    {
        return billingRuleManagementMapper.selectBillingRuleManagementById(id);
    }

    /**
     * 查询计费规则管理列表
     *
     * @param billingRuleManagement 计费规则管理
     * @return 计费规则管理
     */
    @Override
    public List<BillingRuleManagement> selectBillingRuleManagementList(BillingRuleManagement billingRuleManagement)
    {
        return billingRuleManagementMapper.selectBillingRuleManagementList(billingRuleManagement);
    }

    /**
     * 新增计费规则管理
     *
     * @param billingRuleManagement 计费规则管理
     * @return 结果
     */
    @Override
    public int insertBillingRuleManagement(BillingRuleManagement billingRuleManagement)
    {
        return billingRuleManagementMapper.insertBillingRuleManagement(billingRuleManagement);
    }

    /**
     * 修改计费规则管理
     *
     * @param billingRuleManagement 计费规则管理
     * @return 结果
     */
    @Override
    public int updateBillingRuleManagement(BillingRuleManagement billingRuleManagement)
    {
        return billingRuleManagementMapper.updateBillingRuleManagement(billingRuleManagement);
    }

    /**
     * 通过id批量删除计费规则管理信息
     *
     * @param ids 需要删除的计费规则管理主键
     * @return 结果
     */
    @Override
    public int deleteBillingRuleManagementByIds(Long[] ids)
    {
        return billingRuleManagementMapper.deleteBillingRuleManagementByIds(ids);
    }

    /**
     * 通过id删除计费规则管理信息
     *
     * @param id 计费规则管理主键
     * @return 结果
     */
    @Override
    public int deleteBillingRuleManagementById(Long id)
    {
        return billingRuleManagementMapper.deleteBillingRuleManagementById(id);
    }
}
